package net.heri.xmppchat.controllers;

import java.util.Random;

import android.os.Handler;
import android.os.Message;
import roboguice.event.Observes;

public class ChatController {

	private Handler mHandler;
	
	public void setHandler(Handler handler){
		mHandler = handler;
	}
	
	public void onLabelChanged(@Observes ChatControllerEvents.OnLabelChanged event){
		
//		System.out.println(event.getValue());
		
		Message msg = Message.obtain();
		msg.what = 1;
		msg.obj = String.valueOf(new Random().nextInt() * 100);
		mHandler.sendMessage(msg);
	}
}
